# Create your views here.
from django.http import HttpResponse
from django.utils import simplejson
from livedata.models import LiveChannel
def channel(request):
	#data = {"answer": "answer"}
	l = LiveChannel.objects.all()
	data=[]
	
	for i in l.all():
		obj={}
		obj["name"] = i.name
		obj["url"] = i.url
		data.append(obj)
	return HttpResponse(simplejson.dumps(data, ensure_ascii=False))
